<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org"
	xmlns:dt="http://github.com/dandelion/datatables"
	xmlns:sec="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<title>Edit Use Case</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="author" content="Dhrubo" />




</head>

<body>

	<table id="example-paper" th:fragment="mainflow">
		<thead>
			<tr>
				<th colspan="3">Main Flow</th>
			</tr>

			<tr>
				<th colspan="3">

					<form action="addmainflow">
						<input type="hidden" name="id" th:value="${useCase.id}" />

						<div class="input-append span10">
							<input class="input span12" id="description" type="text"
								placeholder="Description" name="description" />
							<button class="btn btn-success" type="submit">Save</button>
						</div>

					</form>
				</th>

			</tr>

			<tr>
				<th style="width: 5%">Step</th>

				<th>Definition</th>
				<th style="width: 3%">Action</th>
			</tr>
		</thead>
		<tbody>


			<tr th:each="s, rowStat : ${useCase.mainFlow.steps}">
				<td style="width: 5%" th:text="${rowStat.count}">1</td>
				<td class="editable"><a href="#" data-type="text"
					data-inputclass="input span9"
					th:attr="data-pk=${useCase.id}, data-name=${rowStat.count}"
					th:text="${s.description}">Mike</a></td>

				<td>

					<div class="btn-group pull-right">
						<a
							th:href="@{/moveup(usecase=${useCase.id}, index=${rowStat.index})}"
							th:unless="${rowStat.index == 0}" class="btn btn-primary"><i
							class="icon-arrow-up icon-white" title="Move up"></i></a> <a
							th:href="@{/movedown(usecase=${useCase.id}, index=${rowStat.index})}"
							th:unless="${rowStat.count eq rowStat.size}"
							class="btn btn-primary"><i class="icon-arrow-down icon-white"
							title="Move down"></i></a> <a
							th:href="@{/deleteucstep(usecase=${useCase.id}, index=${rowStat.index})}"
							class="btn btn-danger"><i class="icon-remove-sign icon-white"
							title="Delete"></i></a> <a class="btn btn-success"
							th:href="@{/newalternate(usecase=${useCase.id}, index=${rowStat.index})}">
							<i class="icon-share-alt icon-white" title="Add alternate step"></i>
						</a>
					</div>

				</td>
			</tr>

		</tbody>
	</table>

</body>
</html>
